package com.yanqu.road.server.manager.activity.xingyou;

import com.yanqu.road.entity.activity.youxing.CrossXingYouShanShuiTeamActionLogData;
import com.yanqu.road.entity.activity.youxing.CrossXingYouShanShuiUserData;
import com.yanqu.road.entity.activity.youxing.config.XingYouConfig;
import com.yanqu.road.server.manager.activity.xingyou.inter.GridHandleResult;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DiceHandleResult {

    private XingYouConfig config;

    private CrossXingYouShanShuiUserData userData;

    private List<GridHandleResult> gridHandleResultList = new ArrayList<>();

    private Map<Integer, Integer> buffMap = new HashMap<>();

    //需要保存的日志
    private List<Object> autoLogList = new ArrayList<>();

    private List<CrossXingYouShanShuiTeamActionLogData> actionLogDataList = new ArrayList<>();

    //香火祈愿进度
    private int addWish;

    private int ret;

    //被抓
    boolean byCatch;

    //妈祖状态
    boolean inMazu;

    //通行证数量
    private int tongXingNum;

    //是否使用通行证
    private boolean useTongXing;

    //是否是事件格跳转过来的
    private boolean eventGridJump;

    //测试事件
    private int testEventId;

    private CrossXingYouActivity activity;

    public XingYouConfig getConfig() {
        return config;
    }

    public void setConfig(XingYouConfig config) {
        this.config = config;
    }

    public CrossXingYouShanShuiUserData getUserData() {
        return userData;
    }

    public void setUserData(CrossXingYouShanShuiUserData userData) {
        this.userData = userData;
    }

    public List<GridHandleResult> getGridHandleResultList() {
        return gridHandleResultList;
    }

    public void setGridHandleResultList(List<GridHandleResult> gridHandleResultList) {
        this.gridHandleResultList = gridHandleResultList;
    }

    public void addBuff(int buffId, int times){
        int old = buffMap.getOrDefault(buffId, 0);
        buffMap.put(buffId, old + times);
    }

    public Map<Integer, Integer> getBuffMap() {
        return buffMap;
    }

    public void setBuffMap(Map<Integer, Integer> buffMap) {
        this.buffMap = buffMap;
    }

    public int getAddWish() {
        return addWish;
    }

    public void setAddWish(int addWish) {
        this.addWish = addWish;
    }

    public void addWish(int addWish){
        this.addWish += addWish;
    }

    public CrossXingYouActivity getActivity() {
        return activity;
    }

    public void setActivity(CrossXingYouActivity activity) {
        this.activity = activity;
    }

    public List<CrossXingYouShanShuiTeamActionLogData> getActionLogDataList() {
        return actionLogDataList;
    }

    public void setActionLogDataList(List<CrossXingYouShanShuiTeamActionLogData> actionLogDataList) {
        this.actionLogDataList = actionLogDataList;
    }

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public boolean isByCatch() {
        return byCatch;
    }

    public void setByCatch(boolean byCatch) {
        this.byCatch = byCatch;
    }

    public int getTongXingNum() {
        return tongXingNum;
    }

    public void setTongXingNum(int tongXingNum) {
        this.tongXingNum = tongXingNum;
    }

    public boolean isUseTongXing() {
        return useTongXing;
    }

    public void setUseTongXing(boolean useTongXing) {
        this.useTongXing = useTongXing;
    }

    public boolean isInMazu() {
        return inMazu;
    }

    public void setInMazu(boolean inMazu) {
        this.inMazu = inMazu;
    }

    public boolean isEventGridJump() {
        return eventGridJump;
    }

    public void setEventGridJump(boolean eventGridJump) {
        this.eventGridJump = eventGridJump;
    }

    public int getTestEventId() {
        return testEventId;
    }

    public void setTestEventId(int testEventId) {
        this.testEventId = testEventId;
    }

    public List<Object> getAutoLogList() {
        return autoLogList;
    }

    public void setAutoLogList(List<Object> autoLogList) {
        this.autoLogList = autoLogList;
    }

    public void addAutoLog(Object object){
        autoLogList.add(object);
    }
}
